/** <a href="http://www.cpupk.com/decompiler">Eclipse Class Decompiler</a> plugin, Copyright (c) 2017 Chen Chao. **/
package com.minierp.bean;

import java.util.Comparator;

public class InOutCountBeanComparator implements Comparator {
	public int compare(Object obj1, Object obj2) {
		String code1 = ((InOutCountBean) obj1).getProductCode();
		String code2 = ((InOutCountBean) obj2).getProductCode();
		String ptNameSpell1 = ((InOutCountBean) obj1).getPtNameSpell();
		String ptNameSpell2 = ((InOutCountBean) obj2).getPtNameSpell();
		if (code1 == null) {
			code1 = "";
		}
		if (code2 == null) {
			code2 = "";
		}
		if (ptNameSpell1 == null) {
			ptNameSpell1 = "";
		}
		if (ptNameSpell2 == null) {
			ptNameSpell2 = "";
		}
		int ret = ptNameSpell1.compareTo(ptNameSpell2);
		if (ret != 0) {
			return ret;
		}
		return code1.compareTo(code2);
	}
}